<?php

namespace Entities\Cep;

use Doctrine\Common\Collections\ArrayCollection;

/**
 * @Entity
 * @Table(name="cepbr_endereco")
 */
class Endereco extends \Foxframe\Entity
{

	/**
	 * @Id
	 * @Column(type="string", length=10)
	 */
	protected $cep;

	/**
	 * @Column(type="string", length=200)
	 */
	protected $endereco;

	/**
	 * @ManyToOne(targetEntity="Entities\Cep\Bairro", cascade={"all"}, fetch="LAZY")
	 * @JoinColumn(name="id_bairro", referencedColumnName="id_bairro", nullable=true)
	 */
	protected $id_bairro;

	/**
	 * @ManyToOne(targetEntity="Entities\Cep\Cidade", cascade={"all"}, fetch="LAZY")
	 * @JoinColumn(name="id_cidade", referencedColumnName="id_cidade", nullable=true)
	 */
	protected $id_cidade;

	public function getCidade()
	{
		return $this->id_cidade;
	}

	public function getBairro()
	{
		return $this->id_bairro;
	}
}